<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>功能树</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="../../../static/lib/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../static/lib/layuiadmin/style/admin.css" media="all">
    <style>
        html,body{height: 100%;}
        .layui-fluid{height: 96%;}
        .layui-row,.layui-col-xs4,.layui-card,.layui-col-xs8{height: 100%;}
    </style>
    <script type="text/javascript" src="../../common/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../../../static/lib/layuiadmin/layui/layui.js"></script>
    <script type="text/javascript">
        layui.config({
            base: '/static/lib/layuiadmin/',
        }).extend({
            authtree: 'modules/authtree',
        }).use(['jquery', 'authtree', 'form', 'layer']);
    </script>
    <script type="text/javascript" src="../../common/common.js"></script>
    <script type="text/javascript" src="../../common/listTree.js"></script>
    <script type="text/javascript" src="../../common/dataGrid.js"></script>
    <script type="text/javascript" src="../../common/utils.js"></script>
    <script type="text/javascript" src="sysCode.js"></script>

</head>
<body style="margin:0;padding:0px;border:0;width:100%;height:100%;">

<div class="layui-fluid" id="LAY-component-grid-mobile">
    <div class="layui-row layui-col-space10">
        <div class="layui-col-xs4" style="height: 100%">
            <div class="layui-card">
                <div class="layui-card-header">功能列表</div>
                <div class="layui-card-body">
                    <div class="" style="border-bottom:0;padding:0px;margin-bottom: 10px;">
                        <form class="layui-form" action="">
                            <table style="width:98%; table-layout:fixed; margin-left: 15px;">
                                <tr>
                                    <td style='width:80px'>
                                        <a id="addBaseBtn" class="layui-btn layui-btn-sm"> <i class="layui-icon">&#xe654;</i> 增加根节点</a>
                                        <a id="addPeerBtn" class="layui-btn layui-btn-sm"> <i class="layui-icon">&#xe654;</i> 增加同级节点</a>
                                        <a id="addChildBtn" class="layui-btn layui-btn-sm"> <i class="layui-icon">&#xe654;</i> 增加子级节点</a>
                                        <a id="removeBtn" class="layui-btn layui-btn-sm st_back1" lay-event="edit"><i class='layui-icon'>&#xe640;</i>删除</a>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                    <div style="height: 650px; overflow-y: scroll">
                        <ul id="Tree" url="/sys-code/listById" textField="codeName" pid="parentId" idField="id"  onNodeclick="treeselected"></ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs8" style="height: 100%">
            <div class="layui-card">
                <div class="layui-card-header">字典明细<span style="color: red" id="fun"></span></div>
                <div class="layui-card-body" id="edit_node">
                    <form class="layui-form" lay-filter="form">
                        <div>
                            <input type="hidden" name="id" id="id"/>
                            <input type="hidden" name="parentId" id="parentId"/>
                            <input type="hidden" name="codeRoot" id="codeRoot"/>
                            <input type="hidden" name="codeType" id="codeType"/>
                            <input type="hidden" name="codePath" id="codePath"/>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">父字典&nbsp;&nbsp;</label>
                            <div class="layui-input-block">
                                <input id="parentName" style="width:500px;" type="text" name="parentName" lay-verify="required" autocomplete="off" class="layui-input" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" >字典名&nbsp;<span style="color:red; font-size: larger; vertical-align: middle">*</span></label>
                            <div class="layui-input-block">
                                <input id="codeName" style="width:500px;" type="text" name="codeName" lay-verify="codeName" maxlength="25" placeholder="请输入汉字名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否父级&nbsp;<span style="color:red; font-size: larger; vertical-align: middle">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="codeIsParent" id="yes" value="1" title="是">
                                <input type="radio" name="codeIsParent" id="no" value="2" title="否">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否公用&nbsp;<span style="color:red; font-size: larger; vertical-align: middle">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="codeCommon" id="yes2" value="1" title="是">
                                <input type="radio" name="codeCommon" id="no2" value="2" title="否">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">字典类型名&nbsp;&nbsp;</label>
                            <div class="layui-input-block">
                                <input id="codeTypeName" style="width:500px;" type="text" name="codeTypeName"  maxlength="50" placeholder="请输入英文名称，若为空系统自动取得字典名的汉字拼音" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">字典值&nbsp;<span style="color:red; font-size: larger; vertical-align: middle">*</span></label>
                            <div class="layui-input-block">
                                <input id="codeValue" style="width:500px;" type="text" name="codeValue" placeholder="请输入1~200,000的数字" maxlength="6" lay-verify="codeValue"  autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">字典层级&nbsp;<span style="color:red; font-size: larger; vertical-align: middle">*</span></label>
                            <div class="layui-input-block">
                                <input id="codeLevel" style="width:500px;" type="text" name="codeLevel" lay-verify="codeLevel" maxlength="2" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">字典说明&nbsp;&nbsp;</label>
                            <div class="layui-input-block">
                                <textarea rows="" cols="" class="layui-textarea"  style="width:500px;"  id="codeRemark" name="codeRemark"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">顺序：&nbsp;&nbsp;</label>
                            <div class="layui-input-block">
                                <input id="codeSort" style="width:500px;" type="text" name="codeSort" lay-verify="codeSort" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">字段显示&nbsp;&nbsp;</label>
                            <div class="layui-input-block">
                                <input id="codeShow" style="width:500px;" type="text" name="codeShow"  autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sub">保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>